protected $mCurrentRow;
public function __construct( IContextSource $context = null, LinkRenderer $linkRenderer = null ) {
+ if ( $context ) {
+ $this->setContext( $context );
+ }
+
$this->mSort = $this->getRequest()->getText( 'sort' );
if ( !array_key_exists( $this->mSort, $this->getFieldNames() )
|| !$this->isFieldSortable( $this->mSort )
} /* Else leave it at whatever the class default is */
// Parent constructor needs mSort set, so we call it last
- parent::__construct( $context, $linkRenderer );
+ parent::__construct( null, $linkRenderer );
}
/**
public function __construct( IContextSource $context, $userName = null, $search = '',
$including = false, $showAll = false
) {
- parent::__construct( $context );
+ $this->setContext( $context );
$this->mIncluding = $including;
$this->mShowAll = $showAll;
} else {
$this->mDefaultDirection = IndexPager::DIR_DESCENDING;
}
+
+ parent::__construct();
}
/**
* another page
*/
public function __construct( IContextSource $context = null, $par = null, $including = null ) {
+ if ( $context ) {
+ $this->setContext( $context );
+ }
+
$request = $this->getRequest();
$par = $par ?? '';
$parms = explode( '/', $par );
}
}
- parent::__construct( $context );
+ parent::__construct();
}
/**